#ifndef _QI_FUNC_H
#define _QI_FUNC_H

#include "../q_common.h"
#include "qi_vars.h"




struct qi_arg
{
	int array;
	int reference;
	int constant;
	struct qi_type* ptr;
};

struct qi_func
{
	char name[Q_MAX_SYMBOL_LENGTH];

	struct qi_type* returntype;
	int num_args;
	struct qi_arg* args;

	struct qi_func* next;
};

struct qi_funccontainer
{
	struct qi_func* array[Q_HASH_TABLE_SIZE];
};

extern struct qi_funccontainer qi_funcs;

struct qi_func* qi_funclookup(const char* const name);
int qi_addfunc(const char* const name, const char* const returntype, int num_args, const char** argname, int* argref, int* argconst);

void qi_initfuncs();
void qi_freefuncs();


#endif

